
import random,copy, MyModule

class Mod2(object):
    
    def __init__(self):
        self.container = dict()
        for i in range (1,100):
            self.container[i] = MyModule.ModInst()


def Creator():
    return Mod2()

def AboveThreshold(obj):
    if Printable(obj) > 100:
        return True
    else:
        return False

def Mutator(obj):
    temp = copy.deepcopy(obj)
    for i in range (1,100):
        temp.container[i] = MyModule.Mutator(temp.container[i])
    return temp
    
def Printable(obj):
    sum = 0
    for i in range (1,100):
        sum = sum + obj.container[i].value
    return sum

def Comparor(obj_one, obj_two):
    sum1 = 0
    sum2 = 0
    for i in range (1,100):
        sum1 = sum1 + obj_one.container[i].value
    for i in range (1,100):
        sum2 = sum2 + obj_two.container[i].value
    
    if sum1 < sum2:
        return True
    else:
        return False
    
def Differencer(obj_one, obj_two):
    sum1 = 0
    sum2 = 0
    for i in range (1,100):
        sum1 = sum1 + obj_one.container[i].value
    for i in range (1,100):
        sum2 = sum2 + obj_two.container[i].value
    
    if sum1 < sum2:
        return -1
    else:
        return 1